Skip to content

Disable zoom for login page - #106160

Merged
jkmassel merged 2 commits into
trunkfrom
disable/zoom-on-login-screen
Oct 1, 2025
Merged

Disable zoom for login page#106160
jkmassel merged 2 commits into
trunkfrom
disable/zoom-on-login-screen

Conversation

@jkmassel

@jkmassel jkmassel commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

Proposed Changes

Disables pinch-to-zoom and auto-zoom for the login page – this will make OAuth login on mobile devices look and work better.

Why are these changes being made?

  • The user's device may auto-zoom, in which case the login appears broken
  • The user may inadvertently zoom in, in which case it's not obvious how to fix it

There's no benefit to zooming in on this page – the elements are very large. So we're disabling it.

Testing Instructions

On a physical device (or a simulator), load WordPress.com in a private browsing window in Safari. Note that the login screen "jumps" and the edges are cut off (the logo on the left, and "Create an account" on the right). Zoom out to fix the viewport, then tap the "Email Address or Username" field. Note that the zoom happens again and the items at the top are cut off.

On the same device, load the calypso.live link for this PR and repeat the process. Note that the zooming no longer takes place.

Simulator.Screen.Recording.-.iPhone.17.-.2025-09-30.at.18.37.50.mov

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@github-actions

github-actions Bot commented Sep 30, 2025

Copy link
Copy Markdown

@jkmassel
jkmassel force-pushed the disable/zoom-on-login-screen branch from 038b7e5 to 58079f4 Compare October 1, 2025 00:17
@jkmassel
jkmassel requested a review from chriskmnds October 1, 2025 00:42
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 1, 2025
@jkmassel
jkmassel requested review from dcalhoun and kean October 1, 2025 00:42
@jkmassel
jkmassel force-pushed the disable/zoom-on-login-screen branch from 58079f4 to 31f0cb3 Compare October 1, 2025 00:43
@matticbot

Copy link
Copy Markdown
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug disable/zoom-on-login-screen on your sandbox.

<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling zoom for webpages is generally frowned upon as zooming is often considered an accessibility feature. I suggest we avoid this.

iOS only performs the zoom-on-input-focus behavior for inputs with font sizes beneath 16px. Previous font size changes were made in #97374 to avoid the zoom as well. I suggest we pursue this approach instead.

From inspecting the current element styles, the font size is surprisingly calculated to be 14px, even though the Sass attempts to set it as 16px. @alshakero do you have ideas as to what is causing this rem miscalculation?

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling zoom for webpages is generally frowned upon as zooming is often considered an accessibility feature. I suggest we avoid this.

For your average webpage, I agree. For an application interface (especially inside a mobile app), it's unusual to be able to zoom in. If users complain about accessibility issues, we should solve that the same way we would for any other application accessibility problem – increase the font size or fix the layout.

iOS only performs the zoom-on-input-focus behavior for inputs with font sizes beneath 16px

The 16px threshold is an implementation detail that can change at any time – the fix from 9 months ago already doesn't work, so I'm reluctant to rely on something that can break again at any time.

If this is an issue, IMHO we should adopt the system text sizes per https://webkit.org/blog/3709/using-the-system-font-in-web-content/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For your average webpage, I agree. For an application interface (especially inside a mobile app), it's unusual to be able to zoom in. If users complain about accessibility issues, we should solve that the same way we would for any other application accessibility problem – increase the font size or fix the layout.

My personal opinion is that it is not that clear cut. The line between application interface and document can be pretty blurry. Yes, some scenarios could be resolved with better design; other times, accessibility features are truly the most relevant and effective solution. There are a lot of disparate use cases for accessibility features.

Not a "hill I'm doing to die on" for this particular circumstance, but I still think it is misguided if alternatives exist.

The 16px threshold is an implementation detail that can change at any time – the fix from 9 months ago already doesn't work, so I'm reluctant to rely on something that can break again at any time.

If this is an issue, IMHO we should adopt the system text sizes per https://webkit.org/blog/3709/using-the-system-font-in-web-content/

Fair. It is unfortunate that (seemingly) a Sass utility intended to calculate rem based on explicit pixel values is not working as expected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. It is unfortunate that (seemingly) a Sass utility intended to calculate rem based on explicit pixel values is not working as expected.

Agreed – I'm going to merge this PR, but if we can get this reliably fixed by other means I'm happy to revert these changes.

This screen is many folks' first interaction with the app, and right now it appears broken so I want to solve that problem as quickly as we're able.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The back and forth continues! While it looks like the intention was to only disable zoom on the login screen, this actually disabled zoom throughout Calypso.

I'm re-enabling zoom here, but only for MSD, which should hopefully continue to satisfy the issue this PR was trying to fix.
#113337

MSD uses the core components, which ensure on mobile devices the font size is >= 16px so the zoom-on-focus thing doesn't happen. But I can only be sure we use core components on MSD, that's why it's enabled there.

There's no benefit to zooming in on this page

Fwiw I think this statement is too sweeping. While we may feel the elements on the page are large enough, users need the ability to zoom in up to 400%. They may be partially sighted, or perhaps only temporarily partially sighted. It's not a black and white thing of either a screen reader user, or a fully sighted user. There's lots in between.

Comment thread client/login/wp-login/style.scss
@jkmassel
jkmassel merged commit e2195a9 into trunk Oct 1, 2025
13 checks passed
@jkmassel
jkmassel deleted the disable/zoom-on-login-screen branch October 1, 2025 22:43
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants